<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once ('db_conn.php');
$sql="select * from tb_lxwm1 order by id asc";
$adrs=$db->query($sql); 
$adrows=$adrs->fetch_all(MYSQLI_BOTH);


$typeid=isset($_GET['id'])?$_GET['id']:-1;
    if ($typeid==-1)
       $sql="select a.*,b.typename from tb_lxwm a,tb_lxwm1 b  where a.nid=b.id ";   //写新闻查询语句  
    else
       $sql="select a.*,b.typename from tb_lxwm a,tb_lxwm1 b  where a.nid=b.id and a.nid=$typeid";   //写新闻查询语句   
    $abs=$db->query($sql); //执行语句  $rs是一个结果集
    $abcs=$abs->fetch_all(MYSQLI_BOTH);

require 'method_html.php';





$abs->free();
$db->close();